#pragma once
#ifndef _MY_TCP_SERVER_SOCKET_HPP_
#define _MY_TCP_SERVER_SOCKET_HPP_

#include "TcpServerSocket.hpp"
#include "ListTimer.hpp"
#include <vector>

class MyTcpServerSock : public TcpServerSock
{
public:
    MyTcpServerSock(const char* p_ip,int p_port);
    void TimerHandler();
    ~MyTcpServerSock();
protected:
    virtual void Update(void) override;
private:
    std::vector<std::shared_ptr<ClientData>> m_users;
    sort_timer_list m_timer_list;
    epoll_event m_events[MAX_EVENTS_NUM];
    bool m_timeout;
};


#endif // _MY_TCP_SERVER_SOCKET_HPP_